import 'package:backend.core/core/domain/config/config.dart';
import 'package:backend.core/injection_container.dart' as core_di;
import 'package:backend.purchases/domain/clients/app_store_api_client.dart';
import 'package:backend.purchases/domain/helpers/api/app_store/create_api_app_store_expiration_reason_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/app_store/create_api_app_store_offer_type_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/app_store/create_api_app_store_one_time_purchase_item_transaction_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/app_store/create_api_app_store_ownership_type_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/app_store/create_api_app_store_price_increase_status_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/app_store/create_api_app_store_purchased_items_from_internal_ones.dart';
import 'package:backend.purchases/domain/helpers/api/app_store/create_api_app_store_purchased_subscription_transaction_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/app_store/create_api_app_store_revocation_info_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/app_store/create_api_app_store_revocation_reason_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/create_api_money_amount_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_one_time_purchased_item_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_one_time_purchased_item_transaction_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_purchased_item_acknowledgement_status_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_purchased_item_revocation_info_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_purchased_item_revocation_reason_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_purchased_item_revocation_source_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_purchased_items_from_internal_ones.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_purchased_subscription_cancellation_info_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_purchased_subscription_cancellation_survey_reason_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_purchased_subscription_cancellation_survey_result_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_purchased_subscription_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_purchased_subscription_offer_type_from_iternal_one.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_purchased_subscription_pause_info_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_purchased_subscription_price_change_status_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/google_play/create_api_google_play_purchased_subscription_transaction_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/web/create_api_web_bank_card_type_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/web/create_api_web_one_time_purchased_item_transaction_offer_type_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/web/create_api_web_payment_method_failure_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/web/create_api_web_purchased_items_from_internal_ones.dart';
import 'package:backend.purchases/domain/helpers/api/web/create_api_web_purchased_subscription_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/web/create_api_web_purchased_subscription_status_from_transactions.dart';
import 'package:backend.purchases/domain/helpers/api/web/create_api_web_purchased_subscription_transaction_offer_type_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/web/create_api_web_purchased_subscription_transactions_from_internal_ones.dart';
import 'package:backend.purchases/domain/helpers/api/web/yookassa/create_api_yookassa_bank_card_info_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/web/yookassa/create_api_yookassa_one_time_purchased_item_transaction_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/web/yookassa/create_api_yookassa_payment_method_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/web/yookassa/create_api_yookassa_purchased_subscription_transaction_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/api/web/yookassa/create_api_yookassa_transaction_revocation_info_from_internal_one.dart';
import 'package:backend.purchases/domain/helpers/app_store/create_app_store_expiration_reason_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/app_store/create_app_store_offer_type_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/app_store/create_app_store_one_time_purchased_item_transaction_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/app_store/create_app_store_ownership_type_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/app_store/create_app_store_price_increase_status_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/app_store/create_app_store_purchased_subscription_info_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/app_store/create_app_store_purchased_subscription_transaction_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/app_store/create_app_store_revocation_info_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/app_store/create_app_store_revocation_reason_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/app_store/create_app_store_transaction_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/app_store/update_app_store_purchased_subscription_info_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/create_web_bank_card_type_from_yookassa_api_one.dart';
import 'package:backend.purchases/domain/helpers/create_web_money_amount_from_yookassa_api_one.dart';
import 'package:backend.purchases/domain/helpers/get_web_purchased_subscription_max_lapse_duration.dart';
import 'package:backend.purchases/domain/helpers/get_web_purchased_subscription_transaction_expiration_time_map.dart';
import 'package:backend.purchases/domain/helpers/google_play/create_google_play_one_time_purchased_item_info_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/create_google_play_one_time_purchased_item_transaction_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/create_google_play_purchased_subscription_info_cancellation_info_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/create_google_play_purchased_subscription_info_cancellation_survey_reason_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/create_google_play_purchased_subscription_info_cancellation_survey_result_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/create_google_play_purchased_subscription_info_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/create_google_play_purchased_subscription_info_pause_info_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/create_google_play_purchased_subscription_info_price_change_status_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/create_google_play_purchased_subscription_transaction_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/create_google_play_purchased_subscription_transaction_offer_type_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/create_google_play_transaction_revocation_info_from_api_revoked_purchased_item.dart';
import 'package:backend.purchases/domain/helpers/google_play/create_google_play_transaction_revocation_reason_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/create_google_play_transaction_revocation_source_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/get_google_play_purchase_item_type.dart';
import 'package:backend.purchases/domain/helpers/google_play/get_google_play_purchased_subscription_transaction_time.dart';
import 'package:backend.purchases/domain/helpers/google_play/update_google_play_one_time_purchased_item_info_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/update_google_play_one_time_purchased_item_transaction_from_revoked_purchased_item.dart';
import 'package:backend.purchases/domain/helpers/google_play/update_google_play_purchased_subscription_info_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/update_google_play_purchased_subscription_transaction_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/google_play/update_google_play_purchased_subscription_transaction_from_revoked_purchased_item.dart';
import 'package:backend.purchases/domain/helpers/yookassa/create_yookassa_bank_card_info_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/yookassa/create_yookassa_one_time_purchased_item_transaction_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/yookassa/create_yookassa_payment_method_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/yookassa/create_yookassa_purchased_subscription_transaction_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/yookassa/is_yookassa_api_succeeded_payment_revoked.dart';
import 'package:backend.purchases/domain/helpers/yookassa/update_yookassa_payment_method_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/yookassa/update_yookassa_transaction_from_api_one.dart';
import 'package:backend.purchases/domain/helpers/yookassa_api/create_yookassa_api_money_amount_from_internal_one.dart';
import 'package:backend.purchases/domain/repositories/app_store_api_purchased_item_repository/repository.dart';
import 'package:backend.purchases/domain/repositories/google_play_api_purchased_item_repository/repository.dart';
import 'package:backend.purchases/domain/repositories/yookassa_api_payment_repository/repository.dart';
import 'package:backend.purchases/domain/repositories/yookassa_pending_order_repository/repository.dart';
import 'package:backend.purchases/domain/services/app_store_api_access_token_service/service.dart';
import 'package:backend.purchases/domain/use_cases/app_store_api_notification_use_cases/handle_did_change_renewal_status_app_store_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/app_store_api_notification_use_cases/handle_did_fail_to_renew_app_store_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/app_store_api_notification_use_cases/handle_did_renew_app_store_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/app_store_api_notification_use_cases/handle_expired_app_store_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/app_store_api_notification_use_cases/handle_grace_period_expired_app_store_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/app_store_api_notification_use_cases/handle_offer_redeemed_app_store_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/app_store_api_notification_use_cases/handle_price_increase_app_store_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/app_store_api_notification_use_cases/handle_refund_app_store_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/app_store_api_notification_use_cases/handle_subscribed_app_store_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/cancel_web_purchased_subscription/use_case.dart';
import 'package:backend.purchases/domain/use_cases/enable_web_purchased_subscription_auto_renewal/use_case.dart';
import 'package:backend.purchases/domain/use_cases/get_web_purchase_items/use_case.dart';
import 'package:backend.purchases/domain/use_cases/get_web_saved_payment_methods/use_case.dart';
import 'package:backend.purchases/domain/use_cases/get_web_transaction_history/use_case.dart';
import 'package:backend.purchases/domain/use_cases/google_play_api_notification_use_cases/handle_subscription_canceled_google_play_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/google_play_api_notification_use_cases/handle_subscription_deferred_google_play_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/google_play_api_notification_use_cases/handle_subscription_expired_google_play_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/google_play_api_notification_use_cases/handle_subscription_in_grace_period_google_play_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/google_play_api_notification_use_cases/handle_subscription_on_hold_google_play_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/google_play_api_notification_use_cases/handle_subscription_pause_schedule_changed_google_play_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/google_play_api_notification_use_cases/handle_subscription_paused_google_play_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/google_play_api_notification_use_cases/handle_subscription_price_change_confirmed_google_play_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/google_play_api_notification_use_cases/handle_subscription_recovered_google_play_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/google_play_api_notification_use_cases/handle_subscription_renewed_google_play_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/google_play_api_notification_use_cases/handle_subscription_restarted_google_play_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/google_play_api_notification_use_cases/handle_subscription_revoked_google_play_api_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/handle_yookassa_api_payment_notification/use_case.dart';
import 'package:backend.purchases/domain/use_cases/issue_app_store_api_access_token/use_case.dart';
import 'package:backend.purchases/domain/use_cases/obtain_purchased_items/use_case.dart';
import 'package:backend.purchases/domain/use_cases/place_yookassa_order/use_case.dart';
import 'package:backend.purchases/domain/use_cases/remove_web_saved_payment_method/use_case.dart';
import 'package:backend.purchases/domain/use_cases/restore_purchased_items/use_case.dart';
import 'package:backend.purchases/domain/use_cases/run_app_store_api_purchased_item_sync/use_case.dart';
import 'package:backend.purchases/domain/use_cases/run_google_play_api_purchased_item_acknowledgement/use_case.dart';
import 'package:backend.purchases/domain/use_cases/run_google_play_api_purchased_item_sync/use_case.dart';
import 'package:backend.purchases/domain/use_cases/run_web_purchased_subscription_renewal/use_case.dart';
import 'package:backend.purchases/domain/use_cases/run_yookassa_api_payment_sync/use_case.dart';
import 'package:backend.purchases/domain/use_cases/sync_google_play_new_purchased_item/use_case.dart';
import 'package:backend.purchases/infrastructure/clients/app_store_api_client.dart';
import 'package:backend.purchases/infrastructure/controllers/app_store_api_notification_controller/controller.dart';
import 'package:backend.purchases/infrastructure/controllers/google_play_api_notification_controller/controller.dart';
import 'package:backend.purchases/infrastructure/controllers/google_play_new_purchased_item_sync_controller/controller.dart';
import 'package:backend.purchases/infrastructure/controllers/order_placing_controller/controller.dart';
import 'package:backend.purchases/infrastructure/controllers/purchased_item_obtainment_controller/controller.dart';
import 'package:backend.purchases/infrastructure/controllers/purchased_item_restoration_controller/controller.dart';
import 'package:backend.purchases/infrastructure/controllers/web_purchase_item_getting_controller/controller.dart';
import 'package:backend.purchases/infrastructure/controllers/web_purchased_subscription_auto_renewal_enablement_controller/controller.dart';
import 'package:backend.purchases/infrastructure/controllers/web_purchased_subscription_cancellation_controller/controller.dart';
import 'package:backend.purchases/infrastructure/controllers/web_saved_payment_method_getting_controller/controller.dart';
import 'package:backend.purchases/infrastructure/controllers/web_saved_payment_method_removal_controller/controller.dart';
import 'package:backend.purchases/infrastructure/controllers/web_transaction_history_getting_controller/controller.dart';
import 'package:backend.purchases/infrastructure/controllers/yookassa_api_notification_controller/controller.dart';
import 'package:backend.purchases/infrastructure/repositories/app_store_api_purchased_item_repository/repository.dart';
import 'package:backend.purchases/infrastructure/repositories/google_play_api_purchased_item_repository/repository.dart';
import 'package:backend.purchases/infrastructure/repositories/yookassa_api_payment_repository/repository.dart';
import 'package:backend.purchases/infrastructure/repositories/yookassa_pending_order_repository/repository.dart';
import 'package:backend.purchases/infrastructure/services/app_store_api_access_token_service/service.dart';
import 'package:get_it/get_it.dart';
import 'package:googleapis_auth/auth_io.dart' as google_api;
import 'package:http/http.dart' as http;

final sl = GetIt.asNewInstance();

Future<void> init() async {
  /////////////////////////////////////////////////////////////////////////////////////////////////
  // controllers
  /////////////////////////////////////////////////////////////////////////////////////////////////

  sl.registerLazySingleton<AppStoreApiNotificationController>(() {
    return AppStoreApiNotificationControllerImpl(
      handleDidChangeRenewalStatusAppStoreApiNotification: sl(),
      handleDidFailToRenewAppStoreApiNotification: sl(),
      handleDidRenewAppStoreApiNotification: sl(),
      handleExpiredAppStoreApiNotification: sl(),
      handleGracePeriodExpiredAppStoreApiNotification: sl(),
      handleOfferRedeemedAppStoreApiNotification: sl(),
      handlePriceIncreaseAppStoreApiNotification: sl(),
      handleRefundAppStoreApiNotification: sl(),
      handleSubscribedAppStoreApiNotification: sl(),
      doesIPMatchIPOrSubnetMask: core_di.sl(),
    );
  });

  sl.registerLazySingleton<GooglePlayApiNotificationController>(() {
    return GooglePlayApiNotificationControllerImpl(
      handleSubscriptionCanceledGooglePlayApiNotification: sl(),
      handleSubscriptionDeferredGooglePlayApiNotification: sl(),
      handleSubscriptionExpiredGooglePlayApiNotification: sl(),
      handleSubscriptionInGracePeriodGooglePlayApiNotification: sl(),
      handleSubscriptionOnHoldGooglePlayApiNotification: sl(),
      handleSubscriptionPausedGooglePlayApiNotification: sl(),
      handleSubscriptionPauseScheduleChangedGooglePlayApiNotification: sl(),
      handleSubscriptionPriceChangeConfirmedGooglePlayApiNotification: sl(),
      handleSubscriptionRecoveredGooglePlayApiNotification: sl(),
      handleSubscriptionRenewedGooglePlayApiNotification: sl(),
      handleSubscriptionRestartedGooglePlayApiNotification: sl(),
      handleSubscriptionRevokedGooglePlayApiNotification: sl(),
    );
  });

  sl.registerLazySingleton<GooglePlayNewPurchasedItemSyncController>(() {
    return GooglePlayNewPurchasedItemSyncControllerImpl(
      syncGooglePlayNewPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<PurchasedItemObtainmentController>(() {
    return PurchasedItemObtainmentControllerImpl(
      obtainPurchasedItems: sl(),
    );
  });

  sl.registerLazySingleton<PurchasedItemRestorationController>(() {
    return PurchasedItemRestorationControllerImpl(
      restorePurchasedItems: sl(),
    );
  });

  sl.registerLazySingleton<WebPurchaseItemGettingController>(() {
    return WebPurchaseItemGettingControllerImpl(
      getWebPurchaseItems: sl(),
    );
  });

  sl.registerLazySingleton<WebPurchasedSubscriptionAutoRenewalEnablementController>(() {
    return WebPurchasedSubscriptionAutoRenewalEnablementControllerImpl(
      enableWebPurchasedSubscriptionAutoRenewal: sl(),
    );
  });

  sl.registerLazySingleton<WebPurchasedSubscriptionCancellationController>(() {
    return WebPurchasedSubscriptionCancellationControllerImpl(
      cancelWebPurchasedSubscription: sl(),
    );
  });

  sl.registerLazySingleton<WebSavedPaymentMethodGettingController>(() {
    return WebSavedPaymentMethodGettingControllerImpl(
      getWebSavedPaymentMethods: sl(),
    );
  });

  sl.registerLazySingleton<WebSavedPaymentMethodRemovalController>(() {
    return WebSavedPaymentMethodRemovalControllerImpl(
      removeWebSavedPaymentMethod: sl(),
    );
  });

  sl.registerLazySingleton<WebTransactionHistoryGettingController>(() {
    return WebTransactionHistoryGettingControllerImpl(
      getWebTransactionHistory: sl(),
    );
  });

  sl.registerLazySingleton<YookassaApiNotificationController>(() {
    return YookassaApiNotificationControllerImpl(
      handleYookassaApiPaymentNotification: sl(),
      doesIPMatchIPOrSubnetMask: core_di.sl(),
    );
  });

  sl.registerLazySingleton<OrderPlacingController>(() {
    return OrderPlacingControllerImpl(
      placeYookassaOrder: sl(),
    );
  });

  /////////////////////////////////////////////////////////////////////////////////////////////////
  // use cases
  /////////////////////////////////////////////////////////////////////////////////////////////////

  // app store api notification use cases

  sl.registerLazySingleton<HandleDidChangeRenewalStatusAppStoreApiNotification>(() {
    return HandleDidChangeRenewalStatusAppStoreApiNotificationImpl(
      createAppStoreTransactionFromApiOne: sl(),
      createPurchasedSubscriptionInfoFromApiOne: sl(),
      updateAppStorePurchasedSubscriptionInfoFromApiOne: sl(),
      apiPurchasedItemRepository: sl(),
      purchasedSubscriptionInfoRepository: core_di.sl(),
      transactionRepository: core_di.sl(),
    );
  });

  sl.registerLazySingleton<HandleDidFailToRenewAppStoreApiNotification>(() {
    return HandleDidFailToRenewAppStoreApiNotificationImpl(
      createAppStoreTransactionFromApiOne: sl(),
      createPurchasedSubscriptionInfoFromApiOne: sl(),
      updateAppStorePurchasedSubscriptionInfoFromApiOne: sl(),
      apiPurchasedItemRepository: sl(),
      purchasedSubscriptionInfoRepository: core_di.sl(),
      transactionRepository: core_di.sl(),
    );
  });

  sl.registerLazySingleton<HandleDidRenewAppStoreApiNotification>(() {
    return HandleDidRenewAppStoreApiNotificationImpl(
      createAppStoreTransactionFromApiOne: sl(),
      createPurchasedSubscriptionInfoFromApiOne: sl(),
      updateAppStorePurchasedSubscriptionInfoFromApiOne: sl(),
      apiPurchasedItemRepository: sl(),
      purchasedSubscriptionInfoRepository: core_di.sl(),
      transactionRepository: core_di.sl(),
    );
  });

  sl.registerLazySingleton<HandleExpiredAppStoreApiNotification>(() {
    return HandleExpiredAppStoreApiNotificationImpl(
      createAppStoreTransactionFromApiOne: sl(),
      createPurchasedSubscriptionInfoFromApiOne: sl(),
      updateAppStorePurchasedSubscriptionInfoFromApiOne: sl(),
      apiPurchasedItemRepository: sl(),
      purchasedSubscriptionInfoRepository: core_di.sl(),
      transactionRepository: core_di.sl(),
    );
  });

  sl.registerLazySingleton<HandleGracePeriodExpiredAppStoreApiNotification>(() {
    return HandleGracePeriodExpiredAppStoreApiNotificationImpl(
      createAppStoreTransactionFromApiOne: sl(),
      createPurchasedSubscriptionInfoFromApiOne: sl(),
      updateAppStorePurchasedSubscriptionInfoFromApiOne: sl(),
      apiPurchasedItemRepository: sl(),
      purchasedSubscriptionInfoRepository: core_di.sl(),
      transactionRepository: core_di.sl(),
    );
  });

  sl.registerLazySingleton<HandleOfferRedeemedAppStoreApiNotification>(() {
    return HandleOfferRedeemedAppStoreApiNotificationImpl(
      createAppStoreTransactionFromApiOne: sl(),
      createPurchasedSubscriptionInfoFromApiOne: sl(),
      updateAppStorePurchasedSubscriptionInfoFromApiOne: sl(),
      apiPurchasedItemRepository: sl(),
      purchasedSubscriptionInfoRepository: core_di.sl(),
      transactionRepository: core_di.sl(),
    );
  });

  sl.registerLazySingleton<HandlePriceIncreaseAppStoreApiNotification>(() {
    return HandlePriceIncreaseAppStoreApiNotificationImpl(
      createAppStoreTransactionFromApiOne: sl(),
      createPurchasedSubscriptionInfoFromApiOne: sl(),
      updateAppStorePurchasedSubscriptionInfoFromApiOne: sl(),
      apiPurchasedItemRepository: sl(),
      purchasedSubscriptionInfoRepository: core_di.sl(),
      transactionRepository: core_di.sl(),
    );
  });

  sl.registerLazySingleton<HandleRefundAppStoreApiNotification>(() {
    return HandleRefundAppStoreApiNotificationImpl(
      createAppStoreTransactionFromApiOne: sl(),
      createPurchasedSubscriptionInfoFromApiOne: sl(),
      updateAppStorePurchasedSubscriptionInfoFromApiOne: sl(),
      apiPurchasedItemRepository: sl(),
      purchasedSubscriptionInfoRepository: core_di.sl(),
      transactionRepository: core_di.sl(),
    );
  });

  sl.registerLazySingleton<HandleSubscribedAppStoreApiNotification>(() {
    return HandleSubscribedAppStoreApiNotificationImpl(
      createAppStoreTransactionFromApiOne: sl(),
      createPurchasedSubscriptionInfoFromApiOne: sl(),
      updateAppStorePurchasedSubscriptionInfoFromApiOne: sl(),
      apiPurchasedItemRepository: sl(),
      purchasedSubscriptionInfoRepository: core_di.sl(),
      transactionRepository: core_di.sl(),
    );
  });

  // google play api notification use cases

  sl.registerLazySingleton<HandleSubscriptionCanceledGooglePlayApiNotification>(() {
    return HandleSubscriptionCanceledGooglePlayApiNotificationImpl(
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<HandleSubscriptionDeferredGooglePlayApiNotification>(() {
    return HandleSubscriptionDeferredGooglePlayApiNotificationImpl(
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<HandleSubscriptionExpiredGooglePlayApiNotification>(() {
    return HandleSubscriptionExpiredGooglePlayApiNotificationImpl(
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<HandleSubscriptionInGracePeriodGooglePlayApiNotification>(() {
    return HandleSubscriptionInGracePeriodGooglePlayApiNotificationImpl(
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<HandleSubscriptionOnHoldGooglePlayApiNotification>(() {
    return HandleSubscriptionOnHoldGooglePlayApiNotificationImpl(
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<HandleSubscriptionPauseScheduleChangedGooglePlayApiNotification>(() {
    return HandleSubscriptionPauseScheduleChangedGooglePlayApiNotificationImpl(
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<HandleSubscriptionPausedGooglePlayApiNotification>(() {
    return HandleSubscriptionPausedGooglePlayApiNotificationImpl(
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<HandleSubscriptionPriceChangeConfirmedGooglePlayApiNotification>(() {
    return HandleSubscriptionPriceChangeConfirmedGooglePlayApiNotificationImpl(
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<HandleSubscriptionRecoveredGooglePlayApiNotification>(() {
    return HandleSubscriptionRecoveredGooglePlayApiNotificationImpl(
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<HandleSubscriptionRenewedGooglePlayApiNotification>(() {
    return HandleSubscriptionRenewedGooglePlayApiNotificationImpl(
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<HandleSubscriptionRestartedGooglePlayApiNotification>(() {
    return HandleSubscriptionRestartedGooglePlayApiNotificationImpl(
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<HandleSubscriptionRevokedGooglePlayApiNotification>(() {
    return HandleSubscriptionRevokedGooglePlayApiNotificationImpl(
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
    );
  });

  // others

  sl.registerLazySingleton<CancelWebPurchasedSubscription>(() {
    return CancelWebPurchasedSubscriptionImpl(
      webPurchasedSubscriptionInfoRepository: core_di.sl(),
      webTransactionRepository: core_di.sl(),
      webPurchaseItemRepository: core_di.sl(),
      createApiWebPurchasedSubscriptionFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<EnableWebPurchasedSubscriptionAutoRenewal>(() {
    return EnableWebPurchasedSubscriptionAutoRenewalImpl(
      createApiWebPurchasedSubscriptionFromInternalOne: sl(),
      getWebPurchasedSubscriptionTransactionExpirationTimeMap: sl(),
      webTransactionRepository: core_di.sl(),
      webPurchasedSubscriptionInfoRepository: core_di.sl(),
      webPurchaseItemRepository: core_di.sl(),
    );
  });

  sl.registerLazySingleton<GetWebPurchaseItems>(() {
    return GetWebPurchaseItemsImpl(
      webPurchaseItemRepository: core_di.sl(),
    );
  });

  sl.registerLazySingleton<GetWebSavedPaymentMethods>(() {
    return GetWebSavedPaymentMethodsImpl(
      webPaymentMethodRepository: core_di.sl(),
      createApiYookassaPaymentMethodFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<GetWebTransactionHistory>(() {
    return GetWebTransactionHistoryImpl(
      webTransactionRepository: core_di.sl(),
      webPurchaseItemRepository: core_di.sl(),
      createApiMoneyAmountFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<HandleYookassaApiPaymentNotification>(() {
    return HandleYookassaApiPaymentNotificationImpl(
      webPaymentMethodRepository: core_di.sl(),
      yookassaPendingOrderRepository: sl(),
      webTransactionRepository: core_di.sl(),
      webPurchaseItemRepository: core_di.sl(),
      webPurchasedSubscriptionInfoRepository: core_di.sl(),
      createYookassaPaymentMethodFromApiOne: sl(),
      createYookassaOneTimePurchasedItemTransactionFromApiOne: sl(),
      createYookassaPurchasedSubscriptionTransactionFromApiOne: sl(),
      getWebPurchasedSubscriptionTransactionExpirationTimeMap: sl(),
      updateYookassaPaymentMethodFromApiOne: sl(),
      updateYookassaTransactionFromApiOne: sl(),
      getWebPurchasedSubscriptionMaxLapseDuration: sl(),
    );
  });

  sl.registerLazySingleton<IssueAppStoreApiAccessToken>(() {
    return IssueAppStoreApiAccessTokenImpl(
      accessTokenService: sl(),
    );
  });

  sl.registerLazySingleton<ObtainPurchasedItems>(() {
    return ObtainPurchasedItemsImpl(
      webPurchaseItemRepository: core_di.sl(),
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
      webPurchasedSubscriptionInfoRepository: core_di.sl(),
      appStoreApiPurchasedItemRepository: sl(),
      appStorePurchasedSubscriptionInfoRepository: core_di.sl(),
      appStoreTransactionRepository: core_di.sl(),
      appStoreUserToUserLinkRepository: core_di.sl(),
      createApiAppStorePurchasedItemsFromInternalOnes: sl(),
      createApiGooglePlayPurchasedItemsFromInternalOnes: sl(),
      createApiWebPurchasedItemsFromInternalOnes: sl(),
      createAppStorePurchasedSubscriptionInfoFromApiOne: sl(),
      createAppStoreTransactionFromApiOne: sl(),
      devicesToAppStoreUserLinkRepository: core_di.sl(),
      devicesToGooglePlayUserLinkRepository: core_di.sl(),
      getGooglePlayPurchaseItemType: sl(),
      googlePlayUserToUserLinkRepository: core_di.sl(),
      createGooglePlayOneTimePurchasedItemInfoFromApiOne: sl(),
      createGooglePlayOneTimePurchasedItemTransactionFromApiOne: sl(),
      createGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayOneTimePurchasedItemInfoFromApiOne: sl(),
      updateGooglePlayOneTimePurchasedItemTransactionFromRevokedPurchasedItem: sl(),
      webTransactionRepository: core_di.sl(),
    );
  });

  sl.registerLazySingleton<PlaceYookassaOrder>(() {
    return PlaceYookassaOrderImpl(
      webPurchaseItemRepository: core_di.sl(),
      webPaymentMethodRepository: core_di.sl(),
      webPurchasedSubscriptionInfoRepository: core_di.sl(),
      webTransactionRepository: core_di.sl(),
      yookassaApiPaymentRepository: sl(),
      yookassaPendingOrderRepository: sl(),
      createYookassaApiMoneyAmountFromInternalOne: sl(),
      createYookassaOneTimePurchasedItemTransactionFromApiOne: sl(),
      createYookassaPaymentMethodFromApiOne: sl(),
      createYookassaPurchasedSubscriptionTransactionFromApiOne: sl(),
      getWebPurchasedSubscriptionMaxLapseDuration: sl(),
      getWebPurchasedSubscriptionTransactionExpirationTimeMap: sl(),
      updateYookassaPaymentMethodFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<RemoveWebSavedPaymentMethod>(() {
    return RemoveWebSavedPaymentMethodImpl(
      webPaymentMethodRepository: core_di.sl(),
    );
  });

  sl.registerLazySingleton<RestorePurchasedItems>(() {
    return RestorePurchasedItemsImpl(
      webPurchaseItemRepository: core_di.sl(),
      yookassaApiPaymentRepository: sl(),
      yookassaPendingOrderRepository: sl(),
      googlePlayApiPurchasedItemRepository: sl(),
      updateYookassaPaymentMethodFromApiOne: sl(),
      createYookassaOneTimePurchasedItemTransactionFromApiOne: sl(),
      getWebPurchasedSubscriptionTransactionExpirationTimeMap: sl(),
      createYookassaPurchasedSubscriptionTransactionFromApiOne: sl(),
      createYookassaPaymentMethodFromApiOne: sl(),
      webPurchasedSubscriptionInfoRepository: core_di.sl(),
      appStoreApiPurchasedItemRepository: sl(),
      appStorePurchasedSubscriptionInfoRepository: core_di.sl(),
      appStoreTransactionRepository: core_di.sl(),
      appStoreUserToUserLinkRepository: core_di.sl(),
      createApiAppStorePurchasedItemsFromInternalOnes: sl(),
      createApiGooglePlayPurchasedItemsFromInternalOnes: sl(),
      createApiWebPurchasedItemsFromInternalOnes: sl(),
      createAppStorePurchasedSubscriptionInfoFromApiOne: sl(),
      createAppStoreTransactionFromApiOne: sl(),
      devicesToAppStoreUserLinkRepository: core_di.sl(),
      devicesToGooglePlayUserLinkRepository: core_di.sl(),
      getGooglePlayPurchaseItemType: sl(),
      googlePlayUserToUserLinkRepository: core_di.sl(),
      webPaymentMethodRepository: core_di.sl(),
      webTransactionRepository: core_di.sl(),
      getWebPurchasedSubscriptionMaxLapseDuration: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
      createGooglePlayOneTimePurchasedItemInfoFromApiOne: sl(),
      createGooglePlayOneTimePurchasedItemTransactionFromApiOne: sl(),
      createGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayOneTimePurchasedItemInfoFromApiOne: sl(),
      updateGooglePlayOneTimePurchasedItemTransactionFromRevokedPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<RunAppStoreApiPurchasedItemSync>(() {
    return RunAppStoreApiPurchasedItemSyncImpl(
      appStoreApiPurchasedItemRepository: sl(),
      appStorePurchasedSubscriptionInfoRepository: core_di.sl(),
      appStoreTransactionRepository: core_di.sl(),
      createAppStorePurchasedSubscriptionInfoFromApiOne: sl(),
      createAppStoreTransactionFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<RunGooglePlayApiPurchasedItemAcknowledgement>(() {
    return RunGooglePlayApiPurchasedItemAcknowledgementImpl(
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayOneTimePurchasedItemInfoFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<RunGooglePlayApiPurchasedItemSync>(() {
    return RunGooglePlayApiPurchasedItemSyncImpl(
      googlePlayApiPurchasedItemRepository: sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
      createGooglePlayOneTimePurchasedItemTransactionFromApiOne: sl(),
      updateGooglePlayOneTimePurchasedItemInfoFromApiOne: sl(),
      updateGooglePlayOneTimePurchasedItemTransactionFromRevokedPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<RunWebPurchasedSubscriptionRenewal>(() {
    return RunWebPurchasedSubscriptionRenewalImpl(
      webPurchaseItemRepository: core_di.sl(),
      webPurchasedSubscriptionInfoRepository: core_di.sl(),
      webTransactionRepository: core_di.sl(),
      getWebPurchasedSubscriptionTransactionExpirationTimeMap: sl(),
      createYookassaApiMoneyAmountFromInternalOne: sl(),
      webPaymentMethodRepository: core_di.sl(),
      yookassaApiPaymentRepository: sl(),
      emailService: core_di.sl(),
      createYookassaPurchasedSubscriptionTransactionFromApiOne: sl(),
      userRepository: core_di.sl(),
    );
  });

  sl.registerLazySingleton<RunYookassaApiPaymentSync>(() {
    return RunYookassaApiPaymentSyncImpl(
      webPurchaseItemRepository: core_di.sl(),
      yookassaApiPaymentRepository: sl(),
      yookassaPendingOrderRepository: sl(),
      updateYookassaPaymentMethodFromApiOne: sl(),
      createYookassaOneTimePurchasedItemTransactionFromApiOne: sl(),
      getWebPurchasedSubscriptionTransactionExpirationTimeMap: sl(),
      createYookassaPurchasedSubscriptionTransactionFromApiOne: sl(),
      createYookassaPaymentMethodFromApiOne: sl(),
      webPurchasedSubscriptionInfoRepository: core_di.sl(),
      webPaymentMethodRepository: core_di.sl(),
      webTransactionRepository: core_di.sl(),
      getWebPurchasedSubscriptionMaxLapseDuration: sl(),
    );
  });

  sl.registerLazySingleton<SyncGooglePlayNewPurchasedItem>(() {
    return SyncGooglePlayNewPurchasedItemImpl(
      webPurchaseItemRepository: core_di.sl(),
      googlePlayApiPurchasedItemRepository: sl(),
      webPurchasedSubscriptionInfoRepository: core_di.sl(),
      appStorePurchasedSubscriptionInfoRepository: core_di.sl(),
      appStoreTransactionRepository: core_di.sl(),
      createApiAppStorePurchasedItemsFromInternalOnes: sl(),
      createApiGooglePlayPurchasedItemsFromInternalOnes: sl(),
      createApiWebPurchasedItemsFromInternalOnes: sl(),
      devicesToGooglePlayUserLinkRepository: core_di.sl(),
      getGooglePlayPurchaseItemType: sl(),
      webTransactionRepository: core_di.sl(),
      googlePlayPurchasedItemInfoRepository: core_di.sl(),
      googlePlayTransactionRepository: core_di.sl(),
      createGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromApiOne: sl(),
      updateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem: sl(),
      createGooglePlayOneTimePurchasedItemTransactionFromApiOne: sl(),
      updateGooglePlayOneTimePurchasedItemInfoFromApiOne: sl(),
      updateGooglePlayOneTimePurchasedItemTransactionFromRevokedPurchasedItem: sl(),
      googlePlayUserLinkRepository: core_di.sl(),
      appStoreUserLinkRepository: core_di.sl(),
      createGooglePlayOneTimePurchasedItemInfoFromApiOne: sl(),
      createGooglePlayPurchasedSubscriptionInfoFromApiOne: sl(),
    );
  });

  /////////////////////////////////////////////////////////////////////////////////////////////////
  // domain helpers
  /////////////////////////////////////////////////////////////////////////////////////////////////

  //
  // core
  //

  //
  // api
  //

  // app store

  sl.registerLazySingleton<CreateApiAppStorePurchasedSubscriptionExpirationReasonFromInternalOne>(
      () {
    return const CreateApiAppStorePurchasedSubscriptionExpirationReasonFromInternalOneImpl();
  });

  sl.registerLazySingleton<CreateApiAppStoreTransactionOfferTypeFromInternalOne>(() {
    return const CreateApiAppStoreTransactionOfferTypeFromInternalOneImpl();
  });

  sl.registerLazySingleton<CreateApiAppStoreOneTimePurchasedItemTransactionFromInternalOne>(() {
    return CreateApiAppStoreOneTimePurchasedItemTransactionFromInternalOneImpl(
      createApiAppStoreTransactionOfferTypeFromInternalOne: sl(),
      createApiAppStoreTransactionOwnershipTypeFromInternalOne: sl(),
      createApiAppStoreTransactionRevocationInfoFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiAppStoreTransactionOwnershipTypeFromInternalOne>(() {
    return const CreateApiAppStoreTransactionOwnershipTypeFromInternalOneImpl();
  });

  sl.registerLazySingleton<
      CreateApiAppStorePurchasedSubscriptionPriceIncreaseStatusFromInternalOne>(() {
    return const CreateApiAppStorePurchasedSubscriptionPriceIncreaseStatusFromInternalOneImpl();
  });

  sl.registerLazySingleton<CreateApiAppStorePurchasedItemsFromInternalOnes>(() {
    return CreateApiAppStorePurchasedItemsFromInternalOnesImpl(
      createApiAppStorePurchasedSubscriptionExpirationReasonFromInternalOne: sl(),
      createApiAppStoreOneTimePurchasedItemTransactionFromInternalOne: sl(),
      createApiAppStorePurchasedSubscriptionPriceIncreaseStatusFromInternalOne: sl(),
      createApiAppStorePurchasedSubscriptionTransactionFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiAppStorePurchasedSubscriptionTransactionFromInternalOne>(() {
    return CreateApiAppStorePurchasedSubscriptionTransactionFromInternalOneImpl(
      createApiAppStoreTransactionRevocationInfoFromInternalOne: sl(),
      createApiAppStoreTransactionOwnershipTypeFromInternalOne: sl(),
      createApiAppStoreTransactionOfferTypeFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiAppStoreTransactionRevocationInfoFromInternalOne>(() {
    return CreateApiAppStoreTransactionRevocationInfoFromInternalOneImpl(
      createApiAppStoreTransactionRevocationReasonFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiAppStoreTransactionRevocationReasonFromInternalOne>(() {
    return const CreateApiAppStoreTransactionRevocationReasonFromInternalOneImpl();
  });

  // google play

  sl.registerLazySingleton<CreateApiGooglePlayOneTimePurchasedItemFromInternalOne>(() {
    return CreateApiGooglePlayOneTimePurchasedItemFromInternalOneImpl(
      createApiGooglePlayOneTimePurchasedItemTransactionFromInternalOne: sl(),
      createApiGooglePlayPurchasedItemAcknowledgementStatusFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiGooglePlayOneTimePurchasedItemTransactionFromInternalOne>(() {
    return CreateApiGooglePlayOneTimePurchasedItemTransactionFromInternalOneImpl(
      createApiGooglePlayTransactionRevocationInfoFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiGooglePlayPurchasedItemAcknowledgementStatusFromInternalOne>(
      () {
    return const CreateApiGooglePlayPurchasedItemAcknowledgementStatusFromInternalOneImpl();
  });

  sl.registerLazySingleton<CreateApiGooglePlayTransactionRevocationInfoFromInternalOne>(() {
    return CreateApiGooglePlayTransactionRevocationInfoFromInternalOneImpl(
      createApiGooglePlayTransactionRevocationReasonFromInternalOne: sl(),
      createApiGooglePlayTransactionRevocationSourceFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiGooglePlayTransactionRevocationReasonFromInternalOne>(() {
    return const CreateApiGooglePlayTransactionRevocationReasonFromInternalOneImpl();
  });

  sl.registerLazySingleton<CreateApiGooglePlayTransactionRevocationSourceFromInternalOne>(() {
    return const CreateApiGooglePlayTransactionRevocationSourceFromInternalOneImpl();
  });

  sl.registerLazySingleton<CreateApiGooglePlayPurchasedItemsFromInternalOnes>(() {
    return CreateApiGooglePlayPurchasedItemsFromInternalOnesImpl(
      createApiGooglePlayOneTimePurchasedItemFromInternalOne: sl(),
      createApiGooglePlayPurchasedSubscriptionFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiGooglePlayPurchasedSubscriptionCancellationInfoFromInternalOne>(
      () {
    return CreateApiGooglePlayPurchasedSubscriptionCancellationInfoFromInternalOneImpl(
      createApiGooglePlayPurchasedSubscriptionCancellationSurveyResultFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<
      CreateApiGooglePlayPurchasedSubscriptionCancellationSurveyReasonFromInternalOne>(() {
    return const CreateApiGooglePlayPurchasedSubscriptionCancellationSurveyReasonFromInternalOneImpl();
  });

  sl.registerLazySingleton<
      CreateApiGooglePlayPurchasedSubscriptionCancellationSurveyResultFromInternalOne>(() {
    return CreateApiGooglePlayPurchasedSubscriptionCancellationSurveyResultFromInternalOneImpl(
      createApiGooglePlayPurchasedSubscriptionCancellationSurveyReasonFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiGooglePlayPurchasedSubscriptionFromInternalOne>(() {
    return CreateApiGooglePlayPurchasedSubscriptionFromInternalOneImpl(
      createApiGooglePlayPurchasedSubscriptionCancellationInfoFromInternalOne: sl(),
      createApiGooglePlayPurchasedSubscriptionPauseInfoFromInternalOne: sl(),
      createApiGooglePlayPurchasedSubscriptionPriceChangeStatusFromInternalOne: sl(),
      createApiGooglePlayPurchasedSubscriptionTransactionFromInternalOne: sl(),
      createApiGooglePlayPurchasedItemAcknowledgementStatusFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<
      CreateApiGooglePlayPurchasedSubscriptionTransactionOfferTypeFromInternalOne>(() {
    return const CreateApiGooglePlayPurchasedSubscriptionTransactionOfferTypeFromInternalOneImpl();
  });

  sl.registerLazySingleton<CreateApiGooglePlayPurchasedSubscriptionPauseInfoFromInternalOne>(() {
    return const CreateApiGooglePlayPurchasedSubscriptionPauseInfoFromInternalOneImpl();
  });

  sl.registerLazySingleton<
      CreateApiGooglePlayPurchasedSubscriptionPriceChangeStatusFromInternalOne>(() {
    return const CreateApiGooglePlayPurchasedSubscriptionPriceChangeStatusFromInternalOneImpl();
  });

  sl.registerLazySingleton<CreateApiGooglePlayPurchasedSubscriptionTransactionFromInternalOne>(() {
    return CreateApiGooglePlayPurchasedSubscriptionTransactionFromInternalOneImpl(
      createApiGooglePlayTransactionRevocationInfoFromInternalOne: sl(),
      createApiGooglePlayPurchasedSubscriptionTransactionOfferTypeFromInternalOne: sl(),
    );
  });

  // web

  sl.registerLazySingleton<CreateApiYookassaBankCardInfoFromInternalOne>(() {
    return CreateApiYookassaBankCardInfoFromInternalOneImpl(
      createApiWebBankCardTypeFromIntenalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiYookassaOneTimePurchasedItemTransactionFromInternalOne>(() {
    return CreateApiYookassaOneTimePurchasedItemTransactionFromInternalOneImpl(
      createApiMoneyAmountFromInternalOne: sl(),
      createApiYookassaTransactionRevocationInfoFromInternalOne: sl(),
      createApiWebOneTimePurchasedItemTransactionOfferTypeFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiYookassaPaymentMethodFromInternalOne>(() {
    return CreateApiYookassaPaymentMethodFromInternalOneImpl(
      createApiWebPaymentMethodFailureFromInternalOne: sl(),
      createApiYookassaBankCardInfoFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiYookassaPurchasedSubscriptionTransactionFromInternalOne>(() {
    return CreateApiYookassaPurchasedSubscriptionTransactionFromInternalOneImpl(
      createApiMoneyAmountFromInternalOne: sl(),
      createApiYookassaTransactionRevocationInfoFromInternalOne: sl(),
      createApiWebPurchasedSubscriptionTransactionOfferTypeFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiYookassaTransactionRevocationInfoFromInternalOne>(() {
    return CreateApiYookassaTransactionRevocationInfoFromInternalOneImpl(
      createApiMoneyAmountFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiWebBankCardTypeFromIntenalOne>(() {
    return const CreateApiWebBankCardTypeFromIntenalOneImpl();
  });

  sl.registerLazySingleton<CreateApiWebOneTimePurchasedItemTransactionOfferTypeFromInternalOne>(() {
    return const CreateApiWebOneTimePurchasedItemTransactionOfferTypeFromInternalOneImpl();
  });

  sl.registerLazySingleton<CreateApiWebPaymentMethodFailureFromInternalOne>(() {
    return const CreateApiWebPaymentMethodFailureFromInternalOneImpl();
  });

  sl.registerLazySingleton<CreateApiWebPurchasedItemsFromInternalOnes>(() {
    return CreateApiWebPurchasedItemsFromInternalOnesImpl(
      createApiYookassaOneTimePurchasedItemTransactionFromInternalOne: sl(),
      createApiWebPurchasedSubscriptionFromInternalOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiWebPurchasedSubscriptionFromInternalOne>(() {
    return CreateApiWebPurchasedSubscriptionFromInternalOneImpl(
      createApiWebPurchasedSubscriptionStatusFromTransactions: sl(),
      createApiWebPurchasedSubscriptionTransactionsFromInternalOnes: sl(),
    );
  });

  sl.registerLazySingleton<CreateApiWebPurchasedSubscriptionStatusFromTransactions>(() {
    return const CreateApiWebPurchasedSubscriptionStatusFromTransactionsImpl();
  });

  sl.registerLazySingleton<CreateApiWebPurchasedSubscriptionTransactionOfferTypeFromInternalOne>(
      () {
    return const CreateApiWebPurchasedSubscriptionTransactionOfferTypeFromInternalOneImpl();
  });

  sl.registerLazySingleton<CreateApiWebPurchasedSubscriptionTransactionsFromInternalOnes>(() {
    return CreateApiWebPurchasedSubscriptionTransactionsFromInternalOnesImpl(
      createApiYookassaPurchasedSubscriptionTransactionFromInternalOne: sl(),
      getWebPurchasedSubscriptionTransactionExpirationTimeMap: sl(),
    );
  });

  // other

  sl.registerLazySingleton<CreateApiMoneyAmountFromInternalOne>(() {
    return const CreateApiMoneyAmountFromInternalOneImpl();
  });

  //
  // app store
  //

  sl.registerLazySingleton<CreateAppStorePurchasedSubscriptionExpirationReasonFromApiOne>(() {
    return const CreateAppStorePurchasedSubscriptionExpirationReasonFromApiOneImpl();
  });

  sl.registerLazySingleton<CreateAppStoreTransactionOfferTypeFromApiOne>(() {
    return const CreateAppStoreTransactionOfferTypeFromApiOneImpl();
  });

  sl.registerLazySingleton<CreateAppStoreOneTimePurchasedItemTransactionFromApiOne>(() {
    return CreateAppStoreOneTimePurchasedItemTransactionFromApiOneImpl(
      createAppStoreTransactionRevocationInfoFromApiOne: sl(),
      createAppStoreTransactionOwnershipTypeFromApiOne: sl(),
      createAppStoreTransactionOfferTypeFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateAppStoreTransactionOwnershipTypeFromApiOne>(() {
    return const CreateAppStoreTransactionOwnershipTypeFromApiOneImpl();
  });

  sl.registerLazySingleton<CreateAppStorePurchasedSubscriptionPriceIncreaseStatusFromApiOne>(() {
    return const CreateAppStorePurchasedSubscriptionPriceIncreaseStatusFromApiOneImpl();
  });

  sl.registerLazySingleton<CreateAppStorePurchasedSubscriptionInfoFromApiOne>(() {
    return CreateAppStorePurchasedSubscriptionInfoFromApiOneImpl(
      createAppStorePurchasedSubscriptionExpirationReasonFromApiOne: sl(),
      createAppStorePurchasedSubscriptionPriceIncreaseStatusFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateAppStorePurchasedSubscriptionTransactionFromApiOne>(() {
    return CreateAppStorePurchasedSubscriptionTransactionFromApiOneImpl(
      createAppStoreTransactionOfferTypeFromApiOne: sl(),
      createAppStoreTransactionOwnershipTypeFromApiOne: sl(),
      createAppStoreTransactionRevocationInfoFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateAppStoreTransactionRevocationInfoFromApiOne>(() {
    return CreateAppStoreTransactionRevocationInfoFromApiOneImpl(
      createAppStoreTransactionRevocationReasonFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateAppStoreTransactionRevocationReasonFromApiOne>(() {
    return const CreateAppStoreTransactionRevocationReasonFromApiOneImpl();
  });

  sl.registerLazySingleton<CreateAppStoreTransactionFromApiOne>(() {
    return CreateAppStoreTransactionFromApiOneImpl(
      createAppStoreOneTimePurchasedItemTransactionFromApiOne: sl(),
      createAppStoreSubscriptionTransactionFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<UpdateAppStorePurchasedSubscriptionInfoFromApiOne>(() {
    return UpdateAppStorePurchasedSubscriptionInfoFromApiOneImpl(
      createAppStorePurchasedSubscriptionExpirationReasonFromApiOne: sl(),
      createAppStorePurchasedSubscriptionPriceIncreaseStatusFromApiOne: sl(),
    );
  });

  //
  // google play
  //

  sl.registerLazySingleton<CreateGooglePlayOneTimePurchasedItemInfoFromApiOne>(() {
    return const CreateGooglePlayOneTimePurchasedItemInfoFromApiOneImpl();
  });

  sl.registerLazySingleton<CreateGooglePlayOneTimePurchasedItemTransactionFromApiOne>(() {
    return const CreateGooglePlayOneTimePurchasedItemTransactionFromApiOneImpl();
  });

  sl.registerLazySingleton<CreateGooglePlayTransactionRevocationInfoFromApiRevokedPurchasedItem>(
      () {
    return CreateGooglePlayTransactionRevocationInfoFromApiRevokedPurchasedItemImpl(
      createGooglePlayTransactionRevocationReasonFromApiOne: sl(),
      createGooglePlayTransactionRevocationSourceFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateGooglePlayTransactionRevocationReasonFromApiOne>(() {
    return const CreateGooglePlayTransactionRevocationReasonFromApiOneImpl();
  });

  sl.registerLazySingleton<CreateGooglePlayTransactionRevocationSourceFromApiOne>(() {
    return const CreateGooglePlayTransactionRevocationSourceFromApiOneImpl();
  });

  sl.registerLazySingleton<CreateGooglePlayPurchasedSubscriptionInfoCancellationInfoFromApiOne>(() {
    return CreateGooglePlayPurchasedSubscriptionInfoCancellationInfoFromApiOneImpl(
      createGooglePlayPurchasedSubscriptionInfoCancellationSurveyResultFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<
      CreateGooglePlayPurchasedSubscriptionInfoCancellationSurveyReasonFromApiOne>(() {
    return const CreateGooglePlayPurchasedSubscriptionInfoCancellationSurveyReasonFromApiOneImpl();
  });

  sl.registerLazySingleton<
      CreateGooglePlayPurchasedSubscriptionInfoCancellationSurveyResultFromApiOne>(() {
    return CreateGooglePlayPurchasedSubscriptionInfoCancellationSurveyResultFromApiOneImpl(
      createGooglePlayPurchasedSubscriptionInfoCancellationSurveyReasonFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateGooglePlayPurchasedSubscriptionInfoFromApiOne>(() {
    return CreateGooglePlayPurchasedSubscriptionInfoFromApiOneImpl(
      createGooglePlayPurchasedSubscriptionInfoCancellationInfoFromApiOne: sl(),
      createGooglePlayPurchasedSubscriptionInfoPriceChangeStatusFromApiOne: sl(),
      createGooglePlayPurchasedSubscriptionInfoPauseInfoFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateGooglePlayPurchasedSubscriptionInfoPauseInfoFromApiOne>(() {
    return const CreateGooglePlayPurchasedSubscriptionInfoPauseInfoFromApiOneImpl();
  });

  sl.registerLazySingleton<CreateGooglePlayPurchasedSubscriptionInfoPriceChangeStatusFromApiOne>(
      () {
    return const CreateGooglePlayPurchasedSubscriptionInfoPriceChangeStatusFromApiOneImpl();
  });

  sl.registerLazySingleton<CreateGooglePlayPurchasedSubscriptionTransactionFromApiOne>(() {
    return CreateGooglePlayPurchasedSubscriptionTransactionFromApiOneImpl(
      createGooglePlayPurchasedSubscriptionTransactionOfferTypeFromApiOne: sl(),
      getGooglePlayPurchasedSubscriptionTransactionTime: sl(),
    );
  });

  sl.registerLazySingleton<CreateGooglePlayPurchasedSubscriptionTransactionOfferTypeFromApiOne>(() {
    return const CreateGooglePlayPurchasedSubscriptionTransactionOfferTypeFromApiOneImpl();
  });

  sl.registerLazySingleton<GetGooglePlayPurchaseItemType>(() {
    return const GetGooglePlayPurchaseItemTypeImpl();
  });

  sl.registerLazySingleton<GetGooglePlayPurchasedSubscriptionTransactionTime>(() {
    return const GetGooglePlayPurchasedSubscriptionTransactionTimeImpl();
  });

  sl.registerLazySingleton<UpdateGooglePlayOneTimePurchasedItemInfoFromApiOne>(() {
    return const UpdateGooglePlayOneTimePurchasedItemInfoFromApiOneImpl();
  });

  sl.registerLazySingleton<UpdateGooglePlayOneTimePurchasedItemTransactionFromRevokedPurchasedItem>(
      () {
    return UpdateGooglePlayOneTimePurchasedItemTransactionFromRevokedPurchasedItemImpl(
      createGooglePlayTransactionRevocationInfoFromApiRevokedPurchasedItem: sl(),
    );
  });

  sl.registerLazySingleton<UpdateGooglePlayPurchasedSubscriptionInfoFromApiOne>(() {
    return UpdateGooglePlayPurchasedSubscriptionInfoFromApiOneImpl(
      createGooglePlayPurchasedSubscriptionInfoCancellationInfoFromApiOne: sl(),
      createGooglePlayPurchasedSubscriptionInfoPauseInfoFromApiOne: sl(),
      createGooglePlayPurchasedSubscriptionInfoPriceChangeStatusFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<UpdateGooglePlayPurchasedSubscriptionTransactionFromApiOne>(() {
    return const UpdateGooglePlayPurchasedSubscriptionTransactionFromApiOneImpl();
  });

  sl.registerLazySingleton<
      UpdateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItem>(() {
    return UpdateGooglePlayPurchasedSubscriptionTransactionFromRevokedPurchasedItemImpl(
      createGooglePlayTransactionRevocationInfoFromApiRevokedPurchasedItem: sl(),
    );
  });

  //
  // yookassa
  //

  sl.registerLazySingleton<CreateYookassaBankCardInfoFromApiOne>(() {
    return CreateYookassaBankCardInfoFromApiOneImpl(
      createWebBankCardTypeFromYookassaApiOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateYookassaOneTimePurchasedItemTransactionFromApiOne>(() {
    return CreateYookassaOneTimePurchasedItemTransactionFromApiOneImpl(
      createWebMoneyAmountFromYookassaApiOne: sl(),
      isYookassaApiSucceededPaymentRevoked: sl(),
    );
  });

  sl.registerLazySingleton<CreateYookassaPaymentMethodFromApiOne>(() {
    return CreateYookassaPaymentMethodFromApiOneImpl(
      createYookassaBankCardInfoFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<CreateYookassaPurchasedSubscriptionTransactionFromApiOne>(() {
    return CreateYookassaPurchasedSubscriptionTransactionFromApiOneImpl(
      createWebMoneyAmountFromYookassaApiOne: sl(),
      isYookassaApiSucceededPaymentRevoked: sl(),
    );
  });

  sl.registerLazySingleton<IsYookassaApiSucceededPaymentRevoked>(() {
    return const IsYookassaApiSucceededPaymentRevokedImpl();
  });

  sl.registerLazySingleton<UpdateYookassaPaymentMethodFromApiOne>(() {
    return UpdateYookassaPaymentMethodFromApiOneImpl(
      createYookassaBankCardInfoFromApiOne: sl(),
    );
  });

  sl.registerLazySingleton<UpdateYookassaTransactionFromApiOne>(() {
    return UpdateYookassaTransactionFromApiOneImpl(
      createWebMoneyAmountFromYookassaApiOne: sl(),
      isYookassaApiSucceededPaymentRevoked: sl(),
    );
  });

  //
  // yookassa api
  //

  sl.registerLazySingleton<CreateYookassaApiMoneyAmountFromInternalOne>(() {
    return const CreateYookassaApiMoneyAmountFromInternalOneImpl();
  });

  //
  // other
  //

  sl.registerLazySingleton<CreateWebBankCardTypeFromYookassaApiOne>(() {
    return const CreateWebBankCardTypeFromYookassaApiOneImpl();
  });

  sl.registerLazySingleton<CreateWebMoneyAmountFromYookassaApiOne>(() {
    return const CreateWebMoneyAmountFromYookassaApiOneImpl();
  });

  sl.registerLazySingleton<GetWebPurchasedSubscriptionTransactionExpirationTimeMap>(() {
    return const GetWebPurchasedSubscriptionTransactionExpirationTimeMapImpl();
  });

  sl.registerLazySingleton<GetWebPurchasedSubscriptionMaxLapseDuration>(() {
    return const GetWebPurchasedSubscriptionMaxLapseDurationImpl();
  });

  /////////////////////////////////////////////////////////////////////////////////////////////////
  // repositories
  /////////////////////////////////////////////////////////////////////////////////////////////////

  //

  sl.registerLazySingleton<AppStoreApiPurchasedItemRepository>(() {
    return AppStoreApiPurchasedItemRepositoryImpl(
      httpClient: http.Client(),
      appStoreApiClient: sl(),
    );
  });

  sl.registerLazySingleton<GooglePlayApiPurchasedItemRepository>(() {
    return GooglePlayApiPurchasedItemRepositoryImpl(
      googleApiClient: sl(),
    );
  });

  sl.registerLazySingleton<YookassaApiPaymentRepository>(() {
    return YookassaApiPaymentRepositoryImpl(
      httpClient: http.Client(),
    );
  });

  sl.registerLazySingleton<YookassaPendingOrderRepository>(() {
    return YookassaPendingOrderRepositoryImpl(
      db: core_di.sl(),
    );
  });

  /////////////////////////////////////////////////////////////////////////////////////////////////
  // services
  /////////////////////////////////////////////////////////////////////////////////////////////////

  sl.registerLazySingleton<AppStoreApiAccessTokenService>(() {
    return const AppStoreApiAccessTokenServiceImpl();
  });

  /////////////////////////////////////////////////////////////////////////////////////////////////
  // google api client
  /////////////////////////////////////////////////////////////////////////////////////////////////

  final googleApiClient = await google_api.clientViaServiceAccount(
    Config().googleServiceAccountCredentials,
    [
      'https://www.googleapis.com/auth/androidpublisher',
    ],
  );

  sl.registerLazySingleton<google_api.AutoRefreshingAuthClient>(() {
    return googleApiClient;
  });

  /////////////////////////////////////////////////////////////////////////////////////////////////
  // app store api client
  /////////////////////////////////////////////////////////////////////////////////////////////////

  final appStoreApiClient = await createAppStoreApiClient(
    issueAppStoreApiAccessToken: sl(),
    baseClient: http.Client(),
  );

  sl.registerLazySingleton<AppStoreApiClient>(() {
    return appStoreApiClient;
  });
}
